import { Tabs } from 'antd-mobile'
import './style.css'
import { useTabs } from './useTabs'
import HomeList from './components/HomeList'
import { useState } from 'react'

const Home = () => {
    const { channels } = useTabs()
    return (
        <div>
            <div className='tabContainer'>
                <Tabs defaultActiveKey={'0'}>
                    {channels.map(item => (
                        <Tabs.Tab key={item.id} title={item.name} >
                            <div className='listContainer'>
                                <HomeList channelId={'' + item.id}></HomeList>
                            </div>
                        </Tabs.Tab>
                    ))}
                </Tabs>
            </div>
        </div>
    )
}
export default Home